package com.yqRecite.util.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 图片资源映射
 */
@Configuration
public class URLConfig implements WebMvcConfigurer {
    /**
     *  * 资源映射路径
     *  * addResourceHandler：访问映射路径
     *  * addResourceLocations：资源绝对路径
     * @param registry
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/images/**").addResourceLocations("file:"+"D:\\32266\\upload\\images\\");

    }

}
